/**
 * HP Subscriber, Network, and Application Policy
 *
 * Copyright (C) 2009-2014 Hewlett-Packard Company
 */
package com.hp.snap.gr.action;

import com.hp.snap.gr.exception.ActionException;
import com.hp.snap.gr.model.jaxb.ActionPlanType;

import java.util.Map;

/**
 * Action plan service which responsible for executing an action plan and return action plan output parameters
 *
 * @author Joey Yi
 */
public interface ActionPlanService {
    /**
     * The basic steps of action plan execution is:
     * 1. Evaluating the action plan input parameters;
     * 2. Execute the actions in plan one-by-one;
     *
     * @param actionPlan The action plan object/definition to be executed;
     * @param isAsync    Async mode for action plan execution;
     * @return action plan output parameters
     * @throws com.hp.snap.gr.exception.ActionException
     */
    Map<String, Object> execute(ActionPlanType actionPlan, boolean isAsync) throws ActionException;

     void setGlobalValue(Map<String,String> config);
}
